// NetTetrisDlg.h : header file
//

#pragma once

#include "types.h"

#define DOWN_TIMER 1    // Timer ID
#define ROW_NUM 20      //
#define COL_NUM 12      // 

class CLocalPane;
class CNextElementPane;
class CElement;

class CLocalDisplayer;
class CRemoteDisplayer;
class CGameConfiger;
class CChatter;
class CClientManager;

// CNetTetrisDlg dialog
class CNetTetrisDlg : public CDialog
{
// Construction
public:
	CNetTetrisDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_NETTETRIS_DIALOG };

    virtual BOOL PreTranslateMessage(MSG* pMsg);    // Add for key message

protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
private:
    void Init();

protected:
	HICON m_hIcon;

    CLocalPane         *m_pSquarePane;
    CNextElementPane    *m_pNextElementPane;
    CElement            *m_pCurrentElement;

    CLocalDisplayer     *m_pLocalDisplayer;
    CRemoteDisplayer    *m_pRemoteDisplayer;
    CGameConfiger       *m_pGameConfiger;
    CChatter            *m_pChatter;
    CClientManager      *m_pClientManager;

    bool    m_bSingleMode;
    bool    m_bStart;
    bool    m_bPause;
    bool    m_bGameOver;
    bool    m_bElementStop;
    bool    m_bShowRemotePane;
    int     m_iPlayMode;

    CRect   m_rectDlg;


	// Generated message map functions
	virtual BOOL OnInitDialog();
    afx_msg void OnTimer(UINT_PTR nIDEvent);
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
    afx_msg void OnBnClickedButtonStart();
    afx_msg void OnBnClickedButtonQuit();
    afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
    afx_msg void OnBnClickedShowRemote();
    afx_msg void OnBnClickedRadioOnline();
    afx_msg void OnBnClickedButtonLogon();
    afx_msg void OnBnClickedInviteMember();
};
